<template>
  <view class="task-list">
    <Navbar :hideBtn="true" title="买手列表" bgColor="#fff" :h5Show="false" :fixed="false"></Navbar>
    <u-list @scrolltolower="onLoadMore">
      <AccountItem v-for="(o, i) in list" :key="i" :data="o"></AccountItem>
    </u-list>
  </view>
</template>

<script>
import Navbar from '@/components/navbar/Navbar'
import Gap from '@/components/gap/Gap'
import AccountItem from './components/account-item.vue'
import { mixinList } from '@/mixins/mixin-list'
import { getBuyerList } from '@/api/system-buyer'

export default {
  components: {
    Gap,
    Navbar,
    AccountItem
  },
  data() {
    return {
      current: 0,
      params: {
        keyword: undefined
      },
      tabs: [
        { name: '全部', value: -1 },
        { name: '待支付', value: 0 },
        { name: '已完成', value: 1 },
        { name: '待评价', value: 2 },
        { name: '已评价', value: 3 }
      ]
    }
  },
  mixins: [mixinList({
    getParams(params) {
      console.log('mixinList getParams', this.$store);
      return { ...params, loginName: this.$store.state.userInfo?.userName }
    },
    getList(params) {
      console.log('mixinList', params);
      return getBuyerList(params)
    }
  })],
  computed: {
  },
  methods: {
  }
}
</script>

<style lang="scss" scoped>
.task-list {
  // display: flex;
  // flex-direction: column;
  // height: 100%;

  &__main {
    flex: 1;
  }
  .stick-top{
    position: sticky;
    top: 0;
  }
}
</style>